import Vue from 'vue';
import App from './App.vue';
import Element from 'element-ui';
import router from './router'
import store from '@/store'
import Antd from 'ant-design-vue'
import db from './utils/localstorage'
import request from './utils/request'

import 'element-ui/lib/theme-chalk/index.css';
import 'element-ui/lib/theme-chalk/display.css';

Vue.config.productionTip = false
Vue.use(Element)
Vue.use(Antd)
Vue.use(db)

Vue.use({
  install(Vue) {
    Vue.prototype.$db = db
  }
})

Vue.prototype.$post = request.post
Vue.prototype.$get = request.get
Vue.prototype.$put = request.put
Vue.prototype.$delete = request.delete
Vue.prototype.$export = request.export
Vue.prototype.$download = request.download
Vue.prototype.$upload = request.upload

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
